package com.dufcal.repondeursms;


public class Message {

	private int id;
	private Contact contact;
	private String message;
	private int presenceHeure;

	public Message(int id, Contact contact, String message, int presenceHeure) {
		super();
		this.id = id;
		this.contact = contact;
		this.message = message;
		this.presenceHeure = presenceHeure;
	}

	public int getId() {
		return id;
	}

	public Contact getContact() {
		return contact;
	}

	public String getMessage() {
		return message;
	}

	public int getPresenceHeure() {
		return presenceHeure;
	}

	@Override
	public String toString() {
		String rep = message;

		if (!this.contact.getNom().equals("")) {
			rep = this.contact.toString() + " : " + rep;
		}

		if (this.presenceHeure == 1) {
			rep += "+ HEURE";
		}
		return rep;
	}

}
